package com.likeycy.my;

import com.likeycy.my.list.List;
import com.likeycy.my.list.MyLinkedList;

/**
 * @ClassName: MyQueue
 * @Description: 自定义队列第一版
 * @Author: sodagreen
 * @Date: 2021/3/4 17:54
 * @Version: 1.0
 */
public class MyQueue<E> {

    private List<E> list = new MyLinkedList<>();

    public int size() {
        return list.size();
    }

    public boolean isEmpty() {
        return list.isEmpty();
    }

    public void enQueue(E element) {
        list.add(element);
    }

    public E deQueue() {
        return  list.remove(0);
    }

    public E front() {
        return list.get(0);
    }

    public void clear() {
        list.isEmpty();
    }

}
